package ThreadOperation;

public class ThreadDaemon
{
    public static void main(String[] args)
    {
        God god=new God();
        You you=new You();

        Thread thread=new Thread(god);
        thread.setDaemon(true);
        thread.start();
        new Thread(you).start();
    }
}

class God implements Runnable
{
    public void run()
    {
        while (true)
        {
            System.out.println("God always alive!");
        }
    }
}

class You implements Runnable
{
    public void run()
    {
        for (int i = 0; i < 365; i++)
        {
            System.out.println("Happy Alive");
        }
        System.out.println("==================Sad Die========================");
    }
}